#include "BulletDynamics/ConstraintSolver/btConeTwistConstraint.h"
#ifdef __cplusplus
extern "C" {
#endif
btConeTwistConstraintDoubleData* bullet_NewbtConeTwistConstraintDoubleData(){
	btConeTwistConstraintDoubleData* wrap_out = new btConeTwistConstraintDoubleData();
	return wrap_out;
}

double bullet_btConeTwistConstraintDoubleData_GetFieldOfM_biasFactor(btConeTwistConstraintDoubleData* c_this){
	return (double)(c_this->m_biasFactor);
}

double bullet_btConeTwistConstraintDoubleData_GetFieldOfM_damping(btConeTwistConstraintDoubleData* c_this){
	return (double)(c_this->m_damping);
}

double bullet_btConeTwistConstraintDoubleData_GetFieldOfM_limitSoftness(btConeTwistConstraintDoubleData* c_this){
	return (double)(c_this->m_limitSoftness);
}

btTransformDoubleData* bullet_btConeTwistConstraintDoubleData_GetFieldOfM_rbAFrame(btConeTwistConstraintDoubleData* c_this){
	return (btTransformDoubleData*)(&c_this->m_rbAFrame);
}

btTransformDoubleData* bullet_btConeTwistConstraintDoubleData_GetFieldOfM_rbBFrame(btConeTwistConstraintDoubleData* c_this){
	return (btTransformDoubleData*)(&c_this->m_rbBFrame);
}

double bullet_btConeTwistConstraintDoubleData_GetFieldOfM_relaxationFactor(btConeTwistConstraintDoubleData* c_this){
	return (double)(c_this->m_relaxationFactor);
}

double bullet_btConeTwistConstraintDoubleData_GetFieldOfM_swingSpan1(btConeTwistConstraintDoubleData* c_this){
	return (double)(c_this->m_swingSpan1);
}

double bullet_btConeTwistConstraintDoubleData_GetFieldOfM_swingSpan2(btConeTwistConstraintDoubleData* c_this){
	return (double)(c_this->m_swingSpan2);
}

double bullet_btConeTwistConstraintDoubleData_GetFieldOfM_twistSpan(btConeTwistConstraintDoubleData* c_this){
	return (double)(c_this->m_twistSpan);
}

btTypedConstraintDoubleData* bullet_btConeTwistConstraintDoubleData_GetFieldOfM_typeConstraintData(btConeTwistConstraintDoubleData* c_this){
	return (btTypedConstraintDoubleData*)(&c_this->m_typeConstraintData);
}

btConeTwistConstraintData* bullet_NewbtConeTwistConstraintData(){
	btConeTwistConstraintData* wrap_out = new btConeTwistConstraintData();
	return wrap_out;
}

float bullet_btConeTwistConstraintData_GetFieldOfM_biasFactor(btConeTwistConstraintData* c_this){
	return (float)(c_this->m_biasFactor);
}

float bullet_btConeTwistConstraintData_GetFieldOfM_damping(btConeTwistConstraintData* c_this){
	return (float)(c_this->m_damping);
}

float bullet_btConeTwistConstraintData_GetFieldOfM_limitSoftness(btConeTwistConstraintData* c_this){
	return (float)(c_this->m_limitSoftness);
}

char** bullet_btConeTwistConstraintData_GetFieldOfM_pad(btConeTwistConstraintData* c_this){
	return (char**)(&c_this->m_pad);
}

btTransformFloatData* bullet_btConeTwistConstraintData_GetFieldOfM_rbAFrame(btConeTwistConstraintData* c_this){
	return (btTransformFloatData*)(&c_this->m_rbAFrame);
}

btTransformFloatData* bullet_btConeTwistConstraintData_GetFieldOfM_rbBFrame(btConeTwistConstraintData* c_this){
	return (btTransformFloatData*)(&c_this->m_rbBFrame);
}

float bullet_btConeTwistConstraintData_GetFieldOfM_relaxationFactor(btConeTwistConstraintData* c_this){
	return (float)(c_this->m_relaxationFactor);
}

float bullet_btConeTwistConstraintData_GetFieldOfM_swingSpan1(btConeTwistConstraintData* c_this){
	return (float)(c_this->m_swingSpan1);
}

float bullet_btConeTwistConstraintData_GetFieldOfM_swingSpan2(btConeTwistConstraintData* c_this){
	return (float)(c_this->m_swingSpan2);
}

float bullet_btConeTwistConstraintData_GetFieldOfM_twistSpan(btConeTwistConstraintData* c_this){
	return (float)(c_this->m_twistSpan);
}

btTypedConstraintData* bullet_btConeTwistConstraintData_GetFieldOfM_typeConstraintData(btConeTwistConstraintData* c_this){
	return (btTypedConstraintData*)(&c_this->m_typeConstraintData);
}

btConeTwistConstraint* bullet_NewbtConeTwistConstraint(btRigidBody* rbA,btRigidBody* rbB,btTransform* rbAFrame,btTransform* rbBFrame){
	btRigidBody& c_arg_rbA=(btRigidBody&)(*rbA);
	btRigidBody& c_arg_rbB=(btRigidBody&)(*rbB);
	btTransform const& c_arg_rbAFrame=(btTransform const&)(*rbAFrame);
	btTransform const& c_arg_rbBFrame=(btTransform const&)(*rbBFrame);
	btConeTwistConstraint* wrap_out = new btConeTwistConstraint(c_arg_rbA,c_arg_rbB,c_arg_rbAFrame,c_arg_rbBFrame);
	return wrap_out;
}

btConeTwistConstraint* bullet_NewbtConeTwistConstraint1(btRigidBody* rbA,btTransform* rbAFrame){
	btRigidBody& c_arg_rbA=(btRigidBody&)(*rbA);
	btTransform const& c_arg_rbAFrame=(btTransform const&)(*rbAFrame);
	btConeTwistConstraint* wrap_out = new btConeTwistConstraint(c_arg_rbA,c_arg_rbAFrame);
	return wrap_out;
}

void bullet_btConeTwistConstraint_calcAngleInfo(btConeTwistConstraint* c_this){
	c_this->calcAngleInfo();
}

void bullet_btConeTwistConstraint_calcAngleInfo2(btConeTwistConstraint* c_this,btTransform* transA,btTransform* transB,btMatrix3x3* invInertiaWorldA,btMatrix3x3* invInertiaWorldB){
	btTransform const& c_arg_transA=(btTransform const&)(*transA);
	btTransform const& c_arg_transB=(btTransform const&)(*transB);
	btMatrix3x3 const& c_arg_invInertiaWorldA=(btMatrix3x3 const&)(*invInertiaWorldA);
	btMatrix3x3 const& c_arg_invInertiaWorldB=(btMatrix3x3 const&)(*invInertiaWorldB);
	c_this->calcAngleInfo2(c_arg_transA,c_arg_transB,c_arg_invInertiaWorldA,c_arg_invInertiaWorldB);
}

void bullet_btConeTwistConstraint_enableMotor(btConeTwistConstraint* c_this,bool b){
	bool c_arg_b=b;
	c_this->enableMotor(c_arg_b);
}

btTransform* bullet_btConeTwistConstraint_getAFrame(btConeTwistConstraint* c_this){
	btTransform const& c_out = c_this->getAFrame();
	btTransform* wrap_out = (btTransform*)(&c_out);
	return wrap_out;
}

bool bullet_btConeTwistConstraint_getAngularOnly(btConeTwistConstraint* c_this){
	bool c_out = c_this->getAngularOnly();
	bool wrap_out = (c_out);
	return wrap_out;
}

btTransform* bullet_btConeTwistConstraint_getBFrame(btConeTwistConstraint* c_this){
	btTransform const& c_out = c_this->getBFrame();
	btTransform* wrap_out = (btTransform*)(&c_out);
	return wrap_out;
}

double bullet_btConeTwistConstraint_getBiasFactor(btConeTwistConstraint* c_this){
	btScalar c_out = c_this->getBiasFactor();
	double wrap_out = (c_out);
	return wrap_out;
}

double bullet_btConeTwistConstraint_getDamping(btConeTwistConstraint* c_this){
	btScalar c_out = c_this->getDamping();
	double wrap_out = (c_out);
	return wrap_out;
}

double bullet_btConeTwistConstraint_getFixThresh(btConeTwistConstraint* c_this){
	btScalar c_out = c_this->getFixThresh();
	double wrap_out = (c_out);
	return wrap_out;
}

int bullet_btConeTwistConstraint_getFlags(btConeTwistConstraint* c_this){
	int c_out = c_this->getFlags();
	int wrap_out = (c_out);
	return wrap_out;
}

btTransform* bullet_btConeTwistConstraint_getFrameOffsetA(btConeTwistConstraint* c_this){
	btTransform const& c_out = c_this->getFrameOffsetA();
	btTransform* wrap_out = (btTransform*)(&c_out);
	return wrap_out;
}

btTransform* bullet_btConeTwistConstraint_getFrameOffsetB(btConeTwistConstraint* c_this){
	btTransform const& c_out = c_this->getFrameOffsetB();
	btTransform* wrap_out = (btTransform*)(&c_out);
	return wrap_out;
}

void bullet_btConeTwistConstraint_getInfo1NonVirtual(btConeTwistConstraint* c_this,btTypedConstraint::btConstraintInfo1* info){
	btTypedConstraint::btConstraintInfo1 * c_arg_info=(btTypedConstraint::btConstraintInfo1 *)(void*)(info);
	c_this->getInfo1NonVirtual(c_arg_info);
}

void bullet_btConeTwistConstraint_getInfo2NonVirtual(btConeTwistConstraint* c_this,btTypedConstraint::btConstraintInfo2* info,btTransform* transA,btTransform* transB,btMatrix3x3* invInertiaWorldA,btMatrix3x3* invInertiaWorldB){
	btTypedConstraint::btConstraintInfo2 * c_arg_info=(btTypedConstraint::btConstraintInfo2 *)(void*)(info);
	btTransform const& c_arg_transA=(btTransform const&)(*transA);
	btTransform const& c_arg_transB=(btTransform const&)(*transB);
	btMatrix3x3 const& c_arg_invInertiaWorldA=(btMatrix3x3 const&)(*invInertiaWorldA);
	btMatrix3x3 const& c_arg_invInertiaWorldB=(btMatrix3x3 const&)(*invInertiaWorldB);
	c_this->getInfo2NonVirtual(c_arg_info,c_arg_transA,c_arg_transB,c_arg_invInertiaWorldA,c_arg_invInertiaWorldB);
}

double bullet_btConeTwistConstraint_getLimit(btConeTwistConstraint* c_this,int limitIndex){
	int c_arg_limitIndex=limitIndex;
	btScalar c_out = c_this->getLimit(c_arg_limitIndex);
	double wrap_out = (c_out);
	return wrap_out;
}

double bullet_btConeTwistConstraint_getLimitSoftness(btConeTwistConstraint* c_this){
	btScalar c_out = c_this->getLimitSoftness();
	double wrap_out = (c_out);
	return wrap_out;
}

double bullet_btConeTwistConstraint_getMaxMotorImpulse(btConeTwistConstraint* c_this){
	btScalar c_out = c_this->getMaxMotorImpulse();
	double wrap_out = (c_out);
	return wrap_out;
}

btQuaternion* bullet_btConeTwistConstraint_getMotorTarget(btConeTwistConstraint* c_this){
	btQuaternion const& c_out = c_this->getMotorTarget();
	btQuaternion* wrap_out = (btQuaternion*)(&c_out);
	return wrap_out;
}

btVector3* bullet_btConeTwistConstraint_GetPointForAngle(btConeTwistConstraint* c_this,double fAngleInRadians,double fLength){
	btScalar c_arg_fAngleInRadians=fAngleInRadians;
	btScalar c_arg_fLength=fLength;
	btVector3 c_out = c_this->GetPointForAngle(c_arg_fAngleInRadians,c_arg_fLength);
	btVector3* wrap_out = new btVector3(c_out);
	return wrap_out;
}

double bullet_btConeTwistConstraint_getRelaxationFactor(btConeTwistConstraint* c_this){
	btScalar c_out = c_this->getRelaxationFactor();
	double wrap_out = (c_out);
	return wrap_out;
}

int bullet_btConeTwistConstraint_getSolveSwingLimit(btConeTwistConstraint* c_this){
	int c_out = c_this->getSolveSwingLimit();
	int wrap_out = (c_out);
	return wrap_out;
}

int bullet_btConeTwistConstraint_getSolveTwistLimit(btConeTwistConstraint* c_this){
	int c_out = c_this->getSolveTwistLimit();
	int wrap_out = (c_out);
	return wrap_out;
}

double bullet_btConeTwistConstraint_getSwingSpan1(btConeTwistConstraint* c_this){
	btScalar c_out = c_this->getSwingSpan1();
	double wrap_out = (c_out);
	return wrap_out;
}

double bullet_btConeTwistConstraint_getSwingSpan2(btConeTwistConstraint* c_this){
	btScalar c_out = c_this->getSwingSpan2();
	double wrap_out = (c_out);
	return wrap_out;
}

double bullet_btConeTwistConstraint_getTwistAngle(btConeTwistConstraint* c_this){
	btScalar c_out = c_this->getTwistAngle();
	double wrap_out = (c_out);
	return wrap_out;
}

double bullet_btConeTwistConstraint_getTwistLimitSign(btConeTwistConstraint* c_this){
	btScalar c_out = c_this->getTwistLimitSign();
	double wrap_out = (c_out);
	return wrap_out;
}

double bullet_btConeTwistConstraint_getTwistSpan(btConeTwistConstraint* c_this){
	btScalar c_out = c_this->getTwistSpan();
	double wrap_out = (c_out);
	return wrap_out;
}

bool bullet_btConeTwistConstraint_isMaxMotorImpulseNormalized(btConeTwistConstraint* c_this){
	bool c_out = c_this->isMaxMotorImpulseNormalized();
	bool wrap_out = (c_out);
	return wrap_out;
}

bool bullet_btConeTwistConstraint_isMotorEnabled(btConeTwistConstraint* c_this){
	bool c_out = c_this->isMotorEnabled();
	bool wrap_out = (c_out);
	return wrap_out;
}

bool bullet_btConeTwistConstraint_isPastSwingLimit(btConeTwistConstraint* c_this){
	bool c_out = c_this->isPastSwingLimit();
	bool wrap_out = (c_out);
	return wrap_out;
}

void bullet_btConeTwistConstraint_setAngularOnly(btConeTwistConstraint* c_this,bool angularOnly){
	bool c_arg_angularOnly=angularOnly;
	c_this->setAngularOnly(c_arg_angularOnly);
}

void bullet_btConeTwistConstraint_setDamping(btConeTwistConstraint* c_this,double damping){
	btScalar c_arg_damping=damping;
	c_this->setDamping(c_arg_damping);
}

void bullet_btConeTwistConstraint_setFixThresh(btConeTwistConstraint* c_this,double fixThresh){
	btScalar c_arg_fixThresh=fixThresh;
	c_this->setFixThresh(c_arg_fixThresh);
}

void bullet_btConeTwistConstraint_setLimit(btConeTwistConstraint* c_this,int limitIndex,double limitValue){
	int c_arg_limitIndex=limitIndex;
	btScalar c_arg_limitValue=limitValue;
	c_this->setLimit(c_arg_limitIndex,c_arg_limitValue);
}

void bullet_btConeTwistConstraint_setLimit1(btConeTwistConstraint* c_this,double _swingSpan1,double _swingSpan2,double _twistSpan,double _softness,double _biasFactor,double _relaxationFactor){
	btScalar c_arg__swingSpan1=_swingSpan1;
	btScalar c_arg__swingSpan2=_swingSpan2;
	btScalar c_arg__twistSpan=_twistSpan;
	btScalar c_arg__softness=_softness;
	btScalar c_arg__biasFactor=_biasFactor;
	btScalar c_arg__relaxationFactor=_relaxationFactor;
	c_this->setLimit(c_arg__swingSpan1,c_arg__swingSpan2,c_arg__twistSpan,c_arg__softness,c_arg__biasFactor,c_arg__relaxationFactor);
}

void bullet_btConeTwistConstraint_setMaxMotorImpulse(btConeTwistConstraint* c_this,double maxMotorImpulse){
	btScalar c_arg_maxMotorImpulse=maxMotorImpulse;
	c_this->setMaxMotorImpulse(c_arg_maxMotorImpulse);
}

void bullet_btConeTwistConstraint_setMaxMotorImpulseNormalized(btConeTwistConstraint* c_this,double maxMotorImpulse){
	btScalar c_arg_maxMotorImpulse=maxMotorImpulse;
	c_this->setMaxMotorImpulseNormalized(c_arg_maxMotorImpulse);
}

void bullet_btConeTwistConstraint_setMotorTarget(btConeTwistConstraint* c_this,btQuaternion* q){
	btQuaternion const& c_arg_q=(btQuaternion const&)(*q);
	c_this->setMotorTarget(c_arg_q);
}

void bullet_btConeTwistConstraint_setMotorTargetInConstraintSpace(btConeTwistConstraint* c_this,btQuaternion* q){
	btQuaternion const& c_arg_q=(btQuaternion const&)(*q);
	c_this->setMotorTargetInConstraintSpace(c_arg_q);
}

void bullet_btConeTwistConstraint_updateRHS(btConeTwistConstraint* c_this,double timeStep){
	btScalar c_arg_timeStep=timeStep;
	c_this->updateRHS(c_arg_timeStep);
}

#ifdef __cplusplus
}
#endif
